// $codepro.audit.disable com.instantiations.assist.eclipse.analysis.deserializeabilitySecurity
package org.mysofts.eclipseman.util;

import java.util.MissingResourceException;
import java.util.ResourceBundle;

/**
 * Fournisseur de messages.
 * 
 * @author reda
 * 
 */
final class MessagesBundle {
	/**
	 * bundle name.
	 */
	private static final String BUNDLE_NAME = "org.mysofts.eclipseman.messages"; //$NON-NLS-1$

	/**
	 * ressources bundle.
	 */
	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
			.getBundle(BUNDLE_NAME);

	/**
	 * messages.
	 */
	private MessagesBundle() {
		super();
	}

	/**
	 * get string.
	 * 
	 * @param key
	 *            string key.
	 * @return string.
	 */
	public static String getString(final String key) {
		try {
			return RESOURCE_BUNDLE.getString(key);
		} catch (MissingResourceException e) { // $codepro.audit.disable logExceptions
			return '!' + key + '!'; // $codepro.audit.disable
									// disallowStringConcatenation
		}
	}
}
